package com.bgIntlgn.client.entity.sells.receipt;

import java.util.Date;

import yuhuibear.poat.annotations.action.AutoGenerateValue;
import yuhuibear.poat.annotations.relation.Field;
import yuhuibear.poat.annotations.relation.Table;
import yuhuibear.poat.object.bean.Bean;

/**
 * 回款记录。
 * 
 * @author yuhui
 * 
 */
@Table(name = "receipt_records", constrain = "")
public class ReceiptRecord implements Bean {

	@AutoGenerateValue(skipOnNull = true, sqlToGet = "select currval('receipt_records_id_seq')")
	@Field(name = "id", type = "bigserial", constrain = "primary key ")
	private Long id;

	@Field(name = "date", type = "timestamp", constrain = "")
	private Date date;

	/**
	 * 回款类型： 现金， 汇票， 支票。。。[DictionaryType : 回款类型]
	 */
	@Field(name = "type", type = "int8 not null references dictionarys(id)  on update cascade", constrain = "")
	private Long type;

	/**
	 * 金额.
	 */
	@Field(name = "money", type = "numeric(11,3)", constrain = "default 0.0")
	private double money;

	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Date getDate() {
		return this.date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	public Long getType() {
		return this.type;
	}

	public void setType(Long type) {
		this.type = type;
	}

	public double getMoney() {
		return this.money;
	}

	public void setMoney(double money) {
		this.money = money;
	}

}
